package com.csdn.leon.util;


public class URLUtil {

	/*
	 * 首页URL
	 */
	public static String HOME_URL=  "http://blog.csdn.net/index.html";
	public static String YIDONG_URL=  "http://blog.csdn.net/mobile/index.html";//移动
	public static String WEB_URL =    "http://blog.csdn.net/web/index.html";//web
	public static String JIAGOU_URL =  "http://blog.csdn.net/enterprise/index.html";//架构
	public static String CODE_URL=    "http://blog.csdn.net/code/index.html";//编程
	public static String INTERNET_URL="http://blog.csdn.net/www/index.html";//互联网
	public static String SQL_URL=     "http://blog.csdn.net/database/index.html";//数据库
	public static String PROTECT_URL= "http://blog.csdn.net/system/index.html";//系统运维
	public static String CLOUD_URL=   "http://blog.csdn.net/cloud/index.html";//云计算	
	public static String YANFA_URL=   "http://blog.csdn.net/software/index.html";//研发
	public static String ZONGHE_URL=  "http://blog.csdn.net/other/index.html";//综合
	
	
	/*
	 * 首页URL
	 */
	public static String HOME_URL_NEW=  "http://blog.csdn.net/newest.html";
	public static String YIDONG_URL_NEW=  "http://blog.csdn.net/mobile/newest.html";//移动
	public static String WEB_URL_NEW =    "http://blog.csdn.net/web/newest.html";//web
	public static String JIAGOU_URL_NEW =    "http://blog.csdn.net/enterprise/newest.html";//架构
	public static String CODE_URL_NEW=    "http://blog.csdn.net/code/newest.html";//编程
	public static String INTERNET_URL_NEW="http://blog.csdn.net/www/newest.html";//互联网
	public static String SQL_URL_NEW=     "http://blog.csdn.net/database/newest.html";//数据库
	public static String PROTECT_URL_NEW= "http://blog.csdn.net/system/newest.html";//系统运维
	public static String CLOUD_URL_NEW=   "http://blog.csdn.net/cloud/newest.htmll";//云计算	
	public static String YANFA_URL_NEW=   "http://blog.csdn.net/software/newest.html";//研发
	public static String ZONGHE_URL_NEW=  "http://blog.csdn.net/other/newest.html";//综合
	
	
	/**
	 * 专栏URL
	 */
	public static String CLUMNS_SHOUYE_URL=  "http://blog.csdn.net/column.html";
	public static String CLUMNS_YIDONG_URL=  "http://blog.csdn.net/mobile/column.html";
	public static String CLUMNS_WEB_URL =    "http://blog.csdn.net/web/column.html";
	public static String CLUMNS_JIAGOU_URL=    "http://blog.csdn.net/enterprise/column.html";
	public static String CLUMNS_CODE_URL=    "http://blog.csdn.net/code/column.html";
	public static String CLUMNS_INTERNET_URL="http://blog.csdn.net/www/column.html";
	public static String CLUMNS_SQL_URL=     "http://blog.csdn.net/database/column.html";
	public static String CLUMNS_PROTECT_URL= "http://blog.csdn.net/system/column.html";
	public static String CLUMNS_CLOUD_URL=   "http://blog.csdn.net/cloud/column.html";
	public static String CLUMNS_SOFT_URL= "http://blog.csdn.net/software/column.html";
	public static String CLUMNS_OTHER_URL=   "http://blog.csdn.net/other/column.html";
	
	/**所有专栏地址**/
	public static String CLUMNS_ALL_URL=   "http://blog.csdn.net/all/column/list.html";
	
	
	/**
	 * 获取博客列表的URL
	 * 
	 * @param blogType
	 *            博客类型
	 * @param page
	 *            页数
	 * @return
	 */
	public static String getBlogListURL(int blogType,boolean flag) {
		String url = "";
		switch (blogType) {
		case Constants.DEF_ARTICLE_TYPE.HOME:
			if(flag){
			url = HOME_URL;
			}else{
				url = HOME_URL_NEW;
			}
			break;
		case Constants.DEF_ARTICLE_TYPE.YIDONG:
			if(flag){
				url =  YIDONG_URL;
				}
			else{
				url = YIDONG_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.WEB:
			if(flag){
			url = WEB_URL;
			}{
				url = WEB_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.JIAGOU:
			if(flag){
			url = JIAGOU_URL;
			}{
				url = JIAGOU_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.CODE:
			if(flag){
			url = CODE_URL;
			}else{
				url = CODE_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.INTERNETE:
			if(flag){
			url = INTERNET_URL;
			}else{
				url = INTERNET_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.SQL:
			if(flag){
			url = SQL_URL;
			}else{
				url = SQL_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.YUNWEI:
			if(flag){
			url = PROTECT_URL;
			}else{
				url = PROTECT_URL_NEW;	
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.CLOUD:
			if(flag){
			url = CLOUD_URL;
			}else{
				url = CLOUD_URL_NEW;

			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.YANFA:
			if(flag){
			url = YANFA_URL;
			}else{
				url = YANFA_URL_NEW;

			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.ZONGHE:
			if(flag){
			url = ZONGHE_URL;
			}else{
				url = ZONGHE_URL_NEW;

			}
			break;	
		}
		
		return url;
	}
	
	public static String getBlogListURL(int blogType, String page,boolean flag) {
		
		String url = "";
		switch (blogType) {
		case Constants.DEF_ARTICLE_TYPE.HOME:
			if(flag){
			url = HOME_URL;
			}else{
				url = HOME_URL_NEW;
			}
			break;
		case Constants.DEF_ARTICLE_TYPE.YIDONG:
			if(flag){
				url =  YIDONG_URL;
				}
			else{
				url = YIDONG_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.WEB:
			if(flag){
			url = WEB_URL;
			}{
				url = WEB_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.JIAGOU:
			if(flag){
			url = JIAGOU_URL;
			}{
				url = JIAGOU_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.CODE:
			if(flag){
			url = CODE_URL;
			}else{
				url = CODE_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.INTERNETE:
			if(flag){
			url = INTERNET_URL;
			}else{
				url = INTERNET_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.SQL:
			if(flag){
			url = SQL_URL;
			}else{
				url = SQL_URL_NEW;
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.YUNWEI:
			if(flag){
			url = PROTECT_URL;
			}else{
				url = PROTECT_URL_NEW;	
			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.CLOUD:
			if(flag){
			url = CLOUD_URL;
			}else{
				url = CLOUD_URL_NEW;

			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.YANFA:
			if(flag){
			url = YANFA_URL;
			}else{
				url = YANFA_URL_NEW;

			}
			break;	
		case Constants.DEF_ARTICLE_TYPE.ZONGHE:
			if(flag){
			url = ZONGHE_URL;
			}else{
				url = ZONGHE_URL_NEW;

			}
			break;	
		}
		url=url+"?&page="+page;
		return url;
		
	}
	
	/**
	 * 获取专栏列表的URL
	 * 
	 * @param blogType
	 *            博客类型
	 * @param page
	 *            页数
	 * @return
	 */
	public static String getClumnsBlogListURL(int clumnType) {
		String url = "";
		switch (clumnType) {
		case Constants.DEF_ARTICLE_TYPE.HOME:
			url = CLUMNS_SHOUYE_URL;
			break;
		case Constants.DEF_ARTICLE_TYPE.YIDONG:
			url = CLUMNS_YIDONG_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.WEB:
			url = CLUMNS_WEB_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.JIAGOU:
			url = CLUMNS_JIAGOU_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.CODE:
			url = CLUMNS_CODE_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.INTERNETE:
			url = CLUMNS_INTERNET_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.SQL:
			url = SQL_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.YUNWEI:
			url = CLUMNS_PROTECT_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.CLOUD:
			url = CLUMNS_CLOUD_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.YANFA:
			url = CLUMNS_SOFT_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.ZONGHE:
			url = CLUMNS_OTHER_URL;
			break;	
		}
		
		return url;
	}
	
	public static String getClumnsBlogListURL(int clumnType, String page) {
		
		String url = "";
		switch (clumnType) {
		case Constants.DEF_ARTICLE_TYPE.HOME:
			url = CLUMNS_SHOUYE_URL;
			break;
		case Constants.DEF_ARTICLE_TYPE.YIDONG:
			url = CLUMNS_YIDONG_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.WEB:
			url = CLUMNS_WEB_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.JIAGOU:
			url = CLUMNS_JIAGOU_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.CODE:
			url = CLUMNS_CODE_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.INTERNETE:
			url = CLUMNS_INTERNET_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.SQL:
			url = SQL_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.YUNWEI:
			url = CLUMNS_PROTECT_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.CLOUD:
			url = CLUMNS_CLOUD_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.YANFA:
			url = CLUMNS_SOFT_URL;
			break;	
		case Constants.DEF_ARTICLE_TYPE.ZONGHE:
			url = CLUMNS_OTHER_URL;
			break;	
		}
		url=url+"?&page="+page;
		return url;
		
	}
	
	
	
	public static String getBlogCommentURL(String id,String username,String page){
		return "http://blog.csdn.net/"+username+"/comment/list/"+id+"?page="+page;
	}
	public static String getHostBlogListURL(String username){
		String URL="http://blog.csdn.net/"+username+"?viewmode=list";
		return URL;
		
		
	}
	public static String getHostBlogListURL(String username,String page){
	    String URL="http://blog.csdn.net/"+username+"/article/list/"+page;
		return URL;
		
	}
	
	public static String getAllClumnblog(int page){
		return CLUMNS_ALL_URL+"?&page="+page;
	}
	public static String getAllClumnblog(){
		return CLUMNS_ALL_URL;
	}
}
